﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Rexjs</title>
	
	<style>
		global {
			white-space : pre-wrap;
			font-size : 12px;
			font-family : 新宋体;
			line-height : 16px;
			color : white;
			background-color : #2C2C2F;
			display : block;
			padding : 10px;
			border-radius : 3px;
		}
		accessor, function, static, declaration, returns {
			color : #9A9AFF;
		}
		string {
			color : #F58686;
		}
		start, end {
			color : #D4CCCC;
		}
	</style>
</head>
<body>
	<script src="rex.js"></script>

	<script>
		(function(){return;
			var SyntaxTree = Rexjs.SyntaxTree, create = SyntaxTree.prototype.create;

			SyntaxTree.override({
				create : function(){
					//console.profile("create");
					create.call(this);
					//console.profileEnd("create");
					
					console.log(this.global);
					//console.log(this.global.textContent);
					
					//document.body.appendChild(this.global);
					
					return this.global;
				}
			});
		}());
	</script>
	<!--
	<script type="module" src="asi.js"></script>
	<script type="module" src="object.js"></script>
	<script type="module" src="condition.js"></script>
	<script type="module" src="dot.js"></script>
	<script type="module" src="function.js"></script>
	<script type="module" src="class.js"></script>
	<script type="module" src="static-class.js"></script>
	-->
	<script type="module" src33="object.js">
		var fn = () => 123
		
		if
		(
			true
		){
		
			var a = 1
		}
		else
		if
		(false)
		{
			var b = 2
		}
		
		/*
		var get = 1, constructor = 2;
		
		var obj = {
			get [get](){}
		}
		
		class Car extends Rexjs.List {
			constructor(){
				super([1,2,3])
			
			}
		}*/
	</script>
	
	<script type="module3" data-name="hello">
		"use strict -rex"
		var fn = ()=>1;
		
		var x = "1", y = "2", z = "3", as = "4", name = "hello";
		
		export { as as as, x as xx, y, z, (()=>1) as 5 };
		
		export var a = 1, b = 2, c = 3
		
		export function a(){}
		
		export x, name, as;
		
		export var undef
		
		export var p = a;
		
		export default static class myStaticClass {
			static ["a"](){}
			
			static b(){}
			
			static c = 1
		};
		
		export interface intf{}
		
		export class myClass extends intf{}
		
		export enum em {
			a;b;c;
		};
		
		export fn;
	</script>
	
	<script type="module4">
		"use strict -rex"
		
		window.function
		
		let a = ()=>1;
		
		//import * as myModule from "hello"
		
		window.myModule = myModule;
		
		export default a;
		
		var as = 1;
	</script>
	
	<script type="module4">
		"use strict -rex"
		var a = 1, b = 2;
		
		var obj = {
			a = 1,
			b,
			c : {
				a = 1,
				b,
				e : class a {
					static a(){
						return {
							obj
						};
					}
				}
			}
		}
	</script>
	
	<script type="module3">
		// import "array.js";
		// import "function.js";
		// import "object.js"
		import "class.js"
		
		var a= function(){
			"use strict -rex"
			
			class a {
				static value = 1
			}
		}
		/*
		a()
		{}
		
		if(true)var a = 1, b = 2
		
		var b = 1, t = `hello ${ "world" + ` by ${a}` } , 你好`,
		
		c = 2
		var a = ()=> b++
		b

		export class a {
		
		}
		
		
		do 
		{
		
		}
		while 
		(false)
		
		var  a = 1
		
		loop1:
		switch(true){
			case 
			
			1 + 2 > 3 ?
				x => 2 : false
			
				:
			break 
			
			loop1
			
			case 
			
				name :
				
				break
		}
		*/
	</script>
</body>
</html>
